/*
 Author:du
 Time:2017.11.8
*/

using System.IO;
using UnityEditor;
using UnityEngine;

public static class BuildDebugInfoTool
{
    [MenuItem("[FutureCore]/BuildInfo/生成编译信息文本", false, 20)]
    private static void Create()
    {
        if (!Directory.Exists(Application.dataPath + "/StreamingAssets"))
        {
            Directory.CreateDirectory(Application.dataPath + "/StreamingAssets");
        }
        string info_path = Application.dataPath + "/StreamingAssets/build_info.txt";
        StreamWriter build_info = new StreamWriter(info_path);
        build_info.Write("Build from " + SystemInfo.deviceName + " at " + System.DateTime.Now.ToString());
        build_info.Close();
        AssetDatabase.Refresh();
        Debug.Log("Finish Create");
    }
}